from django import forms
from django.contrib.auth.forms import UserCreationForm
from .models import User

class UserRegistrationForm(UserCreationForm):
    class Meta:
        model = User
        # 移除 'username' 字段
        fields = ['email', 'password1', 'password2']